<script setup lang="ts">
import type { CategoryItem } from '@/types/home'

const props = defineProps<{
  list: CategoryItem[]
}>()
console.log('分类组件接收props', props)

</script>

<template>
  <view class="category">
    <navigator class="category-item" hover-class="none" url="/pages/index/index" v-for="item in list" :key="item.id">
      <image class="icon" :src="item.icon"></image>
      <text class="text">{{ item.name }}</text>
    </navigator>
  </view>
</template>

<style lang="scss">
@import '../styles/category.scss';
</style>
